/**
 * Author xiaol
 * Rev
 * Date: 2021-03-24 20:38
 * <p>
 * Copyright (C) 2021 Seeyon, Inc. All rights reserved.
 * <p>
 * This software is the proprietary information of Seeyon, Inc.
 * Use is subject to license terms.
 * @company seeyon.com
 * @author xiaol
 */
package com.lagou.manager;

import com.lagou.annotate.Autowired;
import com.lagou.annotate.Service;
import com.lagou.annotate.Transactional;
import com.lagou.dao.PayDao;

import java.sql.SQLException;

/**
 * @description
 * @date 2021-03-24 20:38
 * @author xiaol
 */
@Service
public class PayManagerImpl implements PayManager{

	@Autowired
	private PayDao payDao;

	public void setPayDao(PayDao payDao) {
		this.payDao = payDao;
	}

	public PayDao getPayDao() {
		return payDao;
	}

	@Transactional(rollBackfor = Exception.class)
	public void pay(Integer money) throws SQLException {
		payDao.addPay();
		payDao.deletePay();
	}
}
